<template>
  <el-card>
    <el-tabs v-model="activeTab" @tab-click="getResumeList">
      <el-tab-pane label="未处理" name="unprocessed">
        <generic-resume ref="unprocessed" :query="unprocessedQuery" />
      </el-tab-pane>
      <el-tab-pane label="有意向" name="accept">
        <generic-resume ref="accept" :query="acceptQuery" />
      </el-tab-pane>
      <el-tab-pane label="无意向" name="reject">
        <generic-resume ref="reject" :query="rejectQuery" />
      </el-tab-pane>
    </el-tabs>
  </el-card>
</template>

<script>
import GenericResume from './components/GenericResume'
export default {
  name: 'RecruitmentResume',
  components: { GenericResume },
  data() {
    return {
      activeTab: 'unprocessed',
      acceptQuery: {
        recruitmentId: this.$route.query.recruitmentId,
        status: 1
      },
      rejectQuery: {
        recruitmentId: this.$route.query.recruitmentId,
        status: 2
      },
      unprocessedQuery: {
        recruitmentId: this.$route.query.recruitmentId,
        status: 0
      }
    }
  },
  methods: {
    getResumeList() {
      this.$refs.accept.getList()
      this.$refs.reject.getList()
      this.$refs.unprocessed.getList()
    }
  }
}
</script>
